package cn.dkk.behavior_design.command;

/**
 * @author dkk
 * @date 2022/7/21
 * @desc
 */
public class Test {
    public static void main(String[] args) {
        Order order1 = new Order();
        order1.setTableNum("1");
        order1.setOrder("香辣鸡腿堡",1);

        Order order2 = new Order();
        order2.setTableNum("2");
        order2.setOrder("嫩牛五方",3);

        Producer producer = new Producer();

        OrderCommand orderCommand = new OrderCommand();
        orderCommand.setOrder(order1);
        OrderCommand orderCommand2 = new OrderCommand();
        orderCommand2.setOrder(order2);
        Consumer consumer = new Consumer();
        orderCommand.setConsumer(consumer);
        orderCommand2.setConsumer(consumer);

        producer.addCommand(orderCommand);
        producer.addCommand(orderCommand2);

        producer.execute();
    }
}
